home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Moscow ML 1.31 / source code / mosml / src / mosmllib / Misc.sig < prev    next >
Encoding:
Text File  |  1996-07-03  |  1.7 KB  |  58 lines  |  [TEXT/R*ch]

  1. (* Misc 1995-09-12 *)
  2.  
  3. (* These functions really belong in General, but can appear there only 
  4.    if defined in the runtime system.  So for now they are here.
  5.  *)
  6.  
  7. val o : ('b -> 'c) * ('a -> 'b) -> 'a -> 'c
  8. val before : ('a * unit) -> 'a
  9.  
  10. val chr : int -> char
  11. val ord : char -> int
  12.  
  13. val explode : string -> char list
  14. val implode : char list -> string
  15. val str     : char -> string
  16. val concat  : string list -> string
  17.  
  18. val vector  : 'a list -> 'a vector
  19.  
  20. exception Option
  21. val getOpt : 'a option * 'a -> 'a
  22. val isSome : 'a option -> bool
  23. val valOf  : 'a option -> 'a      
  24.  
  25. exception Empty;
  26.  
  27. val @       : 'a list * 'a list -> 'a list
  28. val app     : ('a -> unit) -> 'a list -> unit
  29. val foldl   : ('a * 'b -> 'b) -> 'b -> 'a list -> 'b
  30. val foldr   : ('a * 'b -> 'b) -> 'b -> 'a list -> 'b
  31. val hd      : 'a list -> 'a                     (* Empty     *)
  32. val length  : 'a list -> int 
  33. val map     : ('a -> 'b) -> 'a list -> 'b list
  34. val null    : 'a list -> bool
  35. val rev     : 'a list -> 'a list 
  36. val tl      : 'a list -> 'a list                (* Empty     *)
  37.  
  38. val help    : string -> unit
  39.  
  40. (* [help str] provides on-line help on the topic indicated by str.  
  41.  
  42.    help "lib"   gives an overview of the Moscow ML library.
  43.    help "U"     provides help on library unit U.
  44.  
  45.    Help uses a simple browser with the following commands, which must
  46.    be followed by a newline:
  47.  
  48.       d         move down by half a screen
  49.       u      move up by half a screen
  50.       t      move to top of file
  51.       b      move to bottom of file
  52.       /str   cyclically search for string str in help file (case-insensitive)
  53.       n      search for next occurrence of str
  54.       q      quit the browser
  55.  
  56.    A newline by itself moves down one screen (24 lines).
  57. *)
  58.